package com.zw.stock_sell_storage.scheduled;

import com.zw.stock_sell_storage.utils.EMailUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.mail.MessagingException;
import java.io.UnsupportedEncodingException;

@Component
public class ScheduledTask {
    // 添加定时任务
    @Scheduled(cron = "0 0/5 * * * ?") // cron表达式,cron 表达式在线生成地址：https://cron.qqe2.com/
    public void doTask() throws MessagingException, UnsupportedEncodingException {
        System.out.println("定时任务触发~");
        //EMailUtils.ClientTestA();
    }

}
